switch: Create less pango layouts
authorTimm Bäder <mail@baedert.org>
Wed, 4 May 2016 13:25:59 +0000 (15:25 +0200)
committerTimm Bäder <mail@baedert.org>
Wed, 4 May 2016 16:35:30 +0000 (18:35 +0200)
commit4ba1f19b038021ae22dc9443ca010f20eface472
tree887720d7594170ba9c9842da733eec1356b35758
parent1da048d19ac8921a9da843fc4376f927e620b8fb
switch: Create less pango layouts

Instead of creating 2 pango layouts in every draw() and on in
_get_content_size (and calling into gettext twice in both cases), just
keep the layouts around and create them in only one place.
gtk/gtkswitch.c